import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [

  {
    path: '/',
    hidden: true,//不在导航列表中显示
    redirect: '/login',  //当路由未匹配时重定向，可作初始划显示页面设置
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login/index')
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/Home/index'),
    children: [
      {
        path: "/user_info",
        name: "UserInfo",
        component: () => import('../views/UserInfo/index')
      },
      {
        path: "/renewList",
        name: "UserInfo",
        component: () => import('../views/RenewList')
      },
      {
        path: "/myPrivateEducation",
        name: "MyPrivateEducation",
        component: () => import('../views/MyPrivateList')
      },
      {
        path: "/aiChat",
        name: "AiChat",
        component: () => import('../views/AIChat')
      },
      {
        path: "/loos",
        name: "LoosList",
        component: () => import('../views/LoosList')
      }
    ]
  }
]

const router = new VueRouter({
  mode: 'history', // 去掉#，需要路由模式改为history
  routes
})

export default router
